package com.romaremez.testuser.tests;

import com.romaremez.testuser.src.userdata.User;
import org.junit.Before;
import org.junit.Test;
import static org.junit.Assert.*;


public class UserTest {

    User user;
    @Before
    public void setUp() throws Exception {
         user = new User("admin", "admin");
    }

    @Test
    public void testIsAdmin() throws Exception {
         assertTrue("must be true", user.isAdmin());
    }

    @Test
    public void testGetLoginNotNull() throws Exception {
        assertNotNull("must be String", user.getLogin());
    }

    @Test
    public void testIsCorrectPassword() throws Exception {
        assertTrue("must be true", user.isCorrectPassword("admin"));
    }
}
